package sz.szsmk.citizencard.ui.fragment;

import androidx.recyclerview.widget.LinearLayoutManager;
import androidx.recyclerview.widget.RecyclerView;

import sz.szsmk.citizencard.R;
import sz.szsmk.citizencard.databinding.ServiceDistancesFragmentBinding;
import sz.szsmk.citizencard.mvp.contract.IAllDistanceContact;
import sz.szsmk.citizencard.mvp.presenter.AllDistancePresenter;
import sz.szsmk.citizencard.ui.adapter.AllDistanceAdapter;
import sz.szsmk.citizencard.ui.base.IBaseFragment;

/**
 * Copyright (c)2018
 * author: zdh
 * created on: 2018/7/12 10:02
 * description:
 */
public class ServiceDistanceFragment extends IBaseFragment<AllDistancePresenter, ServiceDistancesFragmentBinding>
        implements IAllDistanceContact.IAllDistanceView {

    public static ServiceDistanceFragment getInstance() {
        ServiceDistanceFragment sf = new ServiceDistanceFragment();
        return sf;
    }


    @Override
    protected int attachLayoutRes() {
        return R.layout.service_distances_fragment;
    }

    @Override
    protected void initInjector() {

    }

    @Override
    protected void initViews() {
        RecyclerView allTypeRv = dataBinding.allDistancesRv;
        LinearLayoutManager linearLayoutManager = new LinearLayoutManager(getActivity());
        allTypeRv.setLayoutManager(linearLayoutManager);
        AllDistanceAdapter allTypeAdapter = new AllDistanceAdapter(getActivity());
        allTypeRv.setAdapter(allTypeAdapter);
    }

    @Override
    protected void updateViews() {

    }

    @Override
    public void updataError() {

    }

    @Override
    public void getNewsInfoSucc() {

    }
}
